package com.muyu.chat.mapper;



import com.muyu.chat.doamin.ChatMessage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**
 * 聊天 mapper
 *
 *
 * */
@Mapper
public interface MessageMapper {

    List<ChatMessage> getFriendMsgList(@Param("userId") Long userId);

    List<ChatMessage> getChatMessage(@Param("sendUserId") Long sendUserId, @Param("acceptUserId") Long acceptUserId);

    Boolean sendMsg(@Param("sendUserId") Long sendUserId, @Param("acceptUserId") Long acceptUserId, @Param("content") String content, @Param("type") String type, @Param("soundTime") Integer soundTime, @Param("sendTime") String sendTime,@Param("identification") Integer identification);

    Boolean readedMsg(@Param("sendUserId") Long sendUserId, @Param("acceptUserId") Long acceptUserId);

    int getAllNoReadMsgNum(Long acceptUserId);

    Boolean delMsg(Long id);

}
